package fr.upmc.tep.lambda.evaluation.types;

/**
 * This class represents a node that contains an abstraction. It has a head
 * member that represents the parameters in the form of a String. The member
 * body can be an application, an abstraction or a variable.
 * 
 * @author Fabrice Reynaud, Yihan Wang
 *
 */
public class LAbstractionNode extends LNode{
	
	private String head;
	private LNode body;
	
	public LAbstractionNode(String head, LNode body, LNode parent){
		super(parent);
		this.head = head;
		this.body = body;
	}	

	public String getHead() {
		return head;
	}

	public void setHead(String head) {
		this.head = head;
	}

	public LNode getBody() {
		return body;
	}

	public void setBody(LNode body) {
		this.body = body;
	}
	
	public String toLambdaExpression() {
		return "(l" + head + "." + body.toLambdaExpression() + ")";
	}
}